//
// Created by Administrator on 2024/8/8.
//

#include "jtt809_0x1301.h"

namespace protocol {
    void JTT809_0x1301::serialize(MessagePackWriter &writer) {
        JTT809SubBody::serialize(writer);
        writer.writeByte(objectType);
        writer.writeString(responder);
        writer.writeString(responderTel);
        writer.writeString(objectId);
        writer.writeUint(sourceDataType);
        writer.writeUint(sourceMsgSn);
        writer.writeUint(infoLength);
        infoContent.serialize(writer);
    }

    void JTT809_0x1301::deserialize(MessagePackReader &reader) {
        JTT809SubBody::deserialize(reader);
        reader.readByte(objectType);
        reader.readString(responder);
        reader.readString(responderTel);
        reader.readString(objectId);
        reader.readUint(sourceDataType);
        reader.readUint(sourceMsgSn);
        reader.readUint(infoLength);
        infoContent = Container<char>(infoLength);
        infoContent.deserialize(reader);
    }
} // jtt809